package com.example.demo;

import java.util.ArrayList;

/**
 * @author liuhe
 * @date 2020/08/10
 */
public class GCDemo {

    public static class A {
        B b;
    }

    public static class B {
        A a;
    }

    public static void main(String[] args) {
        A a = new A();
        B b = new B();
        a.b = b;
        b.a = a;
        a = null;
        b = null;

        ArrayList<Integer> integers = new ArrayList<>();
        Integer i =0;
        while (true) {
            i++;
            integers.add(i);
        }
    }
}
